﻿<!--
//===============================================================================
// Mammoth Patter Miner 2009
//===============================================================================
// Copyright (C) 2008-2009 Arkadiusz Świerczek and Piotr Włodek. All rights reserved.
//===============================================================================
// Defines user interface for the ApplicationOptionsView.
//===============================================================================
-->

<Controls:ChromeWindow x:Class="WpfRcp.Views.Windows.ApplicationOptionsWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:WpfRcp.Controls;assembly=WpfRcp.Controls"
    xmlns:Helpers="clr-namespace:WpfRcp.Helpers"
    xmlns:Regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation"
    xmlns:Globals="clr-namespace:WpfRcp.Core.Globals;assembly=WpfRcp.Core"
    xmlns:Behaviors="clr-namespace:WpfRcp.Controls.Behaviors;assembly=WpfRcp.Controls"
    Title="{Binding Source={x:Static Helpers:ResHelper.Instance}, Path=Resource[ApplicationOptions]}" 
    Height="300" Width="450" WindowStartupLocation="CenterScreen"
    Style="{StaticResource SingleChromeWindowStyleKey}"
    Behaviors:WindowBehavior.HideInsteadClose="True"
    Icon="{Binding RcpSettings.WindowIcon}">

    <DockPanel>
        <Border Background="{DynamicResource WindowContentBackground}" CornerRadius="4" DockPanel.Dock="Bottom" Margin="0 3 0 0">
            <StackPanel FocusManager.IsFocusScope="True" Orientation="Horizontal" Margin="3" HorizontalAlignment="Right">

                <Button Margin="0,0,4,0" IsDefault="True" Width="75"
                        Command="{Binding RestoreDefaultsCommand}"
                        Content="{Binding Source={x:Static Helpers:ResHelper.Instance}, Path=Resource[RestoreDefaults]}" />

                <Button Content="{Binding Source={x:Static Helpers:ResHelper.Instance}, Path=Resource[Close]}"
                        Margin="0,0,4,0" IsCancel="True" Width="75"
                        Command="{Binding CloseCommand}" />
            </StackPanel>
        </Border>

        <TabControl TabStripPlacement="Left"
                Regions:RegionManager.RegionName="{x:Static Globals:RegionNames.OptionsRegion}">

            <TabControl.ItemContainerStyle>
                <Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">
                    <Setter Property="Header" Value="{Binding DataContext.Header}" />
                </Style>
            </TabControl.ItemContainerStyle>

        </TabControl>
    </DockPanel>
</Controls:ChromeWindow>
